import { mock } from "mockjs";

export const useAuth = () => {
  return mock(/.*?\/login\/auth/, "post", {
    code: 0,
    msg: "成功",
    data: { code: 0, message: "", data: "qwe123" },
  });
};

export const getUserInfo = () => {
  mock(/.*?\/userInfo/, "get", {
    code: 0,
    msg: "成功",
    data: {
      code: 0,
      message: "",
      data: {
        userId: "1",
        userName: "杰哥",
        nickName: "Sam",
        avatar: "",
        email: "1039778@qq.com",
        tel: "13983934298",
        addr: "", //内网地址
        token: "qwe123",
        ip: "",
        role: 1, //1管理员 2普通用户
        sign_status: "",
        sign: "",
        link: "", //网站链接
      },
    },
  });
};
